package test.my.com.myapplicationtest.status_circle_view;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;

import test.my.com.myapplicationtest.R;

/**
 * Author : Cooper
 * Time : 2016/6/17  17:20
 * Description :
 */
public class StatusCircleView extends View {

    private Context mContext;

    public StatusCircleView(Context context) {
        super(context);
    }

    public StatusCircleView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public StatusCircleView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.mContext = context;
//        TypedArray ta = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ImageContainer,defStyleAttr,0);
//        int n = ta.getIndexCount();
//        for(int i = 0;i<n;i++){
//            int attr = ta.getIndex(i);
//            switch (attr){
//                case R.styleable.ImageContainer_mImageSpace:
//                    this.mImageSpace = ta.getDimensionPixelOffset(attr,(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, DEFAULT_IMAGE_SPACE,
//                            getResources().getDisplayMetrics()));
//                    break;
//                case R.styleable.ImageContainer_mSmallImageWidth:
//                    this.mSmallImageWidth = ta.getDimensionPixelOffset(attr,(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, DEFAULT_SMALL_IMAGE_WIDTH_AND_HEIGHT,
//                            getResources().getDisplayMetrics()));
//                    break;
//                case R.styleable.ImageContainer_mSmallImageHeight:
//                    this.mSmallImageHeight = ta.getDimensionPixelOffset(attr,(int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, DEFAULT_SMALL_IMAGE_WIDTH_AND_HEIGHT,
//                            getResources().getDisplayMetrics()));
//                    break;m
//            }
//        }
//        ta.recycle();
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
    }
}
